package org.elanfox.intellicommunity.biz.vo;

import lombok.Data;
import org.elanfox.intellicommunity.biz.entity.msg.LocationMsgPO;
import org.elanfox.intellicommunity.common.utils.Jsr310Utils;

/**
 * 用户定位Vo
 *
 * @author loutianxi
 * @date 2020-03-21
 */
@Data
public class UserLocationVo {
    /**
     * 定位时间
     */
    private String dateTime;
    /**
     * 定位地址
     */
    private String address;
    /**
     * 定位器编号
     */
    private Long equNo;

    public UserLocationVo() {
    }

    public UserLocationVo(LocationMsgPO obj) {
        this.dateTime = Jsr310Utils.DateTime.asString(obj.getCreateTime());
        this.address = obj.getLocatorInfo().getAddress();
        this.equNo = obj.getLocatorId();
    }
}
